<?php
    include_once '../tools/DbTools.php';
    DbTools::InitDb();
    $sql="select RealName,AccountCode,AccountPhone,CardNo,CardPwd,CardMoney,CardTime,CardState from bankcard b LEFT JOIN accountinfo a ON a.AccountId= b.AccountId ";
    $date = DbTools::select($sql);
?>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>管理员中心</title>
	</head>
	<body>

    &nbsp;&nbsp;<a href="Newuser.php">开户</a></br></br>
    &nbsp;&nbsp;<a href="NewCard.php">开卡</a></br>
		<div id=""style="display: flex;justify-content: center;">

            <table border="" cellspacing="0" cellpadding=12">
                <tr>
                    <th>姓名</th>
                    <th>身份证号</th>
                    <th>电话</th>
                    <th>银行卡号</th>
                    <th>密码</th>
                    <th>存款</th>
                    <th>开户时间</th>
                    <th>状态</th>
                </tr>
                <?php
                for ($i=0;$i<count($date,0);$i++){?>
                       <tr>
                           <td><?php echo $date[$i]['RealName'] ?></td>
                           <td><?php echo $date[$i]['AccountCode']?></td>
                           <td><?php echo $date[$i]['AccountPhone']?></td>
                           <td><?php echo $date[$i]['CardNo']?></td>
                           <td><?php echo $date[$i]['CardPwd']?></td>
                           <td><?php echo $date[$i]['CardMoney']?></td>
                           <td><?php echo $date[$i]['CardTime']?></td>
                           <td><?php if ($date[$i]['CardState']==0){
                               echo '正常';
                               } else{echo '注销';}?></td>
                       </tr>
                <?php } ?>
            </table>

		</div>
    <a href="../index.php">回到首页</a>
	</body>
</html>
<?php
    DbTools::close();
?>